<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Repos\DepartmentRepo;
use App\Repos\ItemRepo;

class IndexController extends Controller
{
    public function index()
    {
    	$total = ItemRepo::count();
        return view('hrs.index',compact('total'));
    }

    public function test()
    {
    	
        $list = ItemRepo::get();
        foreach ($list as $k => $v) {

           $v->name_pinyin = app('pinyin')->sentence($v->name);
           $v->save();
        }

    }
}
